$(function() {
    // 页面顶部 当前周
    initCurrentWeek();

    // 页面顶部 当前周
    function initCurrentWeek() {
        var one = 8.64e7;
        var today = new Date();
        var day = today.getDay() == 0 ? 7 : today.getDay();
        var start = today.getTime();
        if (day != 1) {
            start = start - (day - 1) * one;
        }
        for (var i = 0; i < 7; i++) {
            var now = new Date(start + i * one);
            var $li = $('<li class="picker-calendar-day" data-date="' + now.toLocaleDateString() + '"><span>' + (now.getDate()) + '</span></li>');
            $('ul.lecture-date-num').append($li);
            if (now.getTime() == today.getTime()) {
                $li.addClass('active');
            }
        }
    }
});